package com.h117121.fashionshop.core.dao;

import java.util.List;

import com.h117121.fashionshop.core.dao.generic.GenericDao;
import com.h117121.fashionshop.core.dom.Product;
import com.h117121.fashionshop.core.dom.ProductQuery;
import com.h117121.fashionshop.core.dom.ResultPage;

public interface ProductDao extends GenericDao<Product, Long> {
	ResultPage findByProductQuery(ProductQuery query, AndOrQueryType andor,
			int index, int numItems);

	ResultPage findByKeyword(String keyword, int index, int numItems);

	ResultPage getNewestProducts(int index, int numItems);

	ResultPage getMostSoldProducts(int index, int numItems);

	ResultPage getSimilarProducts(long id, int index, int numItems);
	
	List<Product> getRandomProducts(int numItems);

	enum AndOrQueryType {
		AND, OR
	}
}